// pages/login/login.js
const qcloud = require('../../vendor/qcloud-weapp-client-sdk/index.js')
const config = require('../../config.js')
const utils = require('../../utils.js')

Page({

  /**
   * 页面的初始数据
   */

  data: {
    jobNum:"",
    name:""
  },
  jobNumFn(e){
    this.setData({
      jobNum: e.detail.value
    })
  },
  nameFn(e){
    this.setData({
      name: e.detail.value
    })
  },

  bindingFn() {
    utils.ajaxFn({
      url: config.service.bingJobNum,
      body: {
        "jobNum": this.data.jobNum,
        "name": this.data.name
      },
      callback: (data) => {
        wx.navigateTo({
          url: `/pages/index/index`
        })
      }
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    
  }

})